package com.hotel.main.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.hotel.main.entity.enums.FoodPlace;
import com.hotel.main.entity.enums.FoodPlan;
import com.hotel.main.entity.enums.PaymentStatus;
import com.hotel.main.entity.enums.RequestStatus;
import com.hotel.main.entity.enums.RoomClass;

@Entity
@Table(name = "applications_for_reservation")
@SequenceGenerator(name="applications_for_reservation_gen", allocationSize=1, sequenceName="application_for_reservation_seq")
public class ApplicationForReservation {

	@Id 
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="applications_for_reservation_gen")
	private Long id;
	
	@Column(name = "last_name", length=50)
	private String lastName;
	
	@Column(name = "first_name", length=50)
	private String firstName;
	
	@Column(name = "middle_name", length=50)
	private String middleName;
	
	@Column(name = "email", length=40)
	private String email;
	
	@Column(name = "phone", length=15)
	private String phone;
	
	@Column(name = "entry_date")
	@Temporal(TemporalType.DATE)
	private Date entryDate;
	
	@Column(name = "leave_date")
	@Temporal(TemporalType.DATE)
	private Date leaveDate;
	
	@Column(name = "adults_quantity")
	private Integer adultsQuantity;
	
	@Column(name = "children_quantity")
	private Integer childrenQuantity;
	
	@Column(name = "payment_status")
	@Enumerated(EnumType.STRING)
	private PaymentStatus paymentStatus;
	
	@Column(name = "request_status")
	@Enumerated(EnumType.STRING)
	private RequestStatus requestStatus;
	
	@Column(name = "room_class")
	@Enumerated(EnumType.STRING)
	private RoomClass roomClass;
	
	@Column(name = "rooms_quantity")
	private Integer roomsQuantity;
	
	@Column(name = "floor")
	private Integer floor;
	
	@Column(name = "food_plan")
	@Enumerated(EnumType.STRING)
	private FoodPlan foodPlan;
	
	@Column(name = "food_place")
	@Enumerated(EnumType.STRING)
	private FoodPlace foodPlace;
	
	@Column(name = "worker_id", length=10)
	private String workerId;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getEntryDate() {
		return entryDate;
	}

	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}

	public Date getLeaveDate() {
		return leaveDate;
	}

	public void setLeaveDate(Date leaveDate) {
		this.leaveDate = leaveDate;
	}

	public Integer getAdultsQuantity() {
		return adultsQuantity;
	}

	public void setAdultsQuantity(Integer adultsQuantity) {
		this.adultsQuantity = adultsQuantity;
	}

	public Integer getChildrenQuantity() {
		return childrenQuantity;
	}

	public void setChildrenQuantity(Integer childrenQuantity) {
		this.childrenQuantity = childrenQuantity;
	}

	public PaymentStatus getPaymentStatus() {
		return paymentStatus;
	}

	public void setPaymentStatus(PaymentStatus paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	public RequestStatus getRequestStatus() {
		return requestStatus;
	}

	public void setRequestStatus(RequestStatus requestStatus) {
		this.requestStatus = requestStatus;
	}

	public RoomClass getRoomClass() {
		return roomClass;
	}

	public void setRoomClass(RoomClass roomClass) {
		this.roomClass = roomClass;
	}

	public Integer getRoomsQuantity() {
		return roomsQuantity;
	}

	public void setRoomsQuantity(Integer roomsQuantity) {
		this.roomsQuantity = roomsQuantity;
	}

	public Integer getFloor() {
		return floor;
	}

	public void setFloor(Integer floor) {
		this.floor = floor;
	}

	public FoodPlan getFoodPlan() {
		return foodPlan;
	}

	public void setFoodPlan(FoodPlan foodPlan) {
		this.foodPlan = foodPlan;
	}

	public FoodPlace getFoodPlace() {
		return foodPlace;
	}

	public void setFoodPlace(FoodPlace foodPlace) {
		this.foodPlace = foodPlace;
	}

	public String getWorkerId() {
		return workerId;
	}

	public void setWorkerId(String workerId) {
		this.workerId = workerId;
	}
}
